<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('设置字段别名')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-interface-add" th:object="${interfaceParamsFieldRelation}">
            <input type="hidden" id="id" name="id" th:value="${id}">
            <input type="hidden" id="type" name="type" th:value="${type}">

            <div class="form-group">
                <label class="col-sm-5 control-label">字段别名：</label>
                <div class="col-sm-6">
                    <input name="aliasName" class="form-control" type="text" th:value="${aliasName}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-5 control-label">字段模式：</label>
                <div class="col-sm-6">
                    <select name="designContent" id="designContent" class="form-control m-b" th:with="type=${@dict.getType('outParamModelType')}">
                        <option value="0">请选择</option>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"  th:field="*{designContent}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "interface/interface";
        $("#form-interface-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                var config = {
                    url: prefix + "/updateAliasName",
                    type: "POST",
                    dataType: "json",
                    async: false,
                    data: $('#form-interface-add').serialize(),
                    success: function (result) {

                    }
                };
                $.ajax(config);
            }
        }
    </script>
</body>
</html>